package com.digitalchina.lxnsy.adapter;

import java.util.List;

import com.digitalchina.lxnsy.R;
import com.digitalchina.lxnsy.base.BaseAdapter;
import com.digitalchina.lxnsy.entity.MyExpertVO;
import com.digitalchina.lxnsy.viewholder.MyExpertsHolder;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * ================================================
 * 项目名称：BigData
 * 类描述：
 * 包名：com.digitalchina.bigdata.adapter
 * 创建人：byd
 * 创建时间：2017/4/5 16:47
 * 修改备注：
 * ================================================
 */

public class MyExpertsAdapter extends BaseAdapter<MyExpertsHolder, MyExpertVO> {

    public MyExpertsAdapter(Context context, List<MyExpertVO> listData) {
        super(context, listData);
    }


    @Override
    public View buildConvertView(LayoutInflater layoutInflater, ViewGroup parent) {
        return inflate(R.layout.item_my_expert, parent);
    }

    @Override
    public MyExpertsHolder buildHolder(View convertView) {
        MyExpertsHolder holder = new MyExpertsHolder();
        holder.title = (TextView) convertView.findViewById(R.id.name);
        return holder;
    }

    @Override
    public void bindViewData(MyExpertsHolder holder, MyExpertVO pesticideVO, int position) {
        holder.title.setText(null == pesticideVO.getName() ? "" : pesticideVO.getName());
    }
}
